import request from '@/utils/request'

// 材料：获取材料列表
export const materialGetListService = (params) =>
  request.get('/material/list', {
    params
  })

// 材料：获取材料数量
export const materialCountService = (params) =>
  request.get('/material/count', {
    params
  })

// 材料：添加材料
// 注意：data需要是一个formData格式的对象
export const materialPublishService = (data) =>
  request.post('/material/save', data)

// 材料：获取材料详情
export const materialGetDetailService = (id) => request.get('/material/' + id)

// 材料：编辑材料接口
export const materialEditService = (data) =>
  request.put('/material/update', data)

// 材料：删除材料接口
export const materialDelService = (id) => request.delete('/material/' + id)
